import {UPDATE_PERSONAL,FETCH_PERSONAL} from "./actions"
import { createReducer } from 'redux-immutablejs'
import Immutable from 'Immutable'




const initialState = Immutable.fromJS({
  name:"",
  sex :"",
  tel:"",
  bankcard:"",
  operator:""
})



export default createReducer(initialState,{
  [FETCH_PERSONAL]:(state,action) => {
    const test = state.merge(action.personal)
    console.log(888,test.toJS());

      return test
  },
  [UPDATE_PERSONAL]:(state,action) => state.merge(action.personal),
})
